<#include "admin/common/include/html_head.html"> <#include
"admin/common/include/sysparam.html"> <#include
"admin/common/include/pagination.html">
<div class="row-fluid">
	<div class="span12">
		<!-- BEGIN EXAMPLE TABLE PORTLET-->
		<div class="portlet box">
			<div class="portlet-title">
				<div class="caption">
					<h5>分组管理</h5>
				</div>
			</div>
			<div class="portlet-body form">
				<form id="groupSearchForm">
					<div class="row-fluid">
						<div class="span6">
							<div class="dataTables_filter" id="sample_1_filter">
								<label>组名称: <input type="text" aria-controls="sample_1"
									value="${_QUERY_s_eq_name}" class="span1 m-wrap medium"
									name="_QUERY_s_eq_name" id="_QUERY_s_eq_name"></label>
							</div>
						</div>
						<div class="span6">
							<div class="dataTables_filter" id="sample_1_filter">
								<label>类型: <@select paramCode=groupType
									value=(_QUERY_n_eq_groupType)?if_exists item='
									name="_QUERY_n_eq_groupType"'/></label>
							</div>
						</div>
					</div>
					<div class="row-fluid">
						<div class="span6">
							<div class="dataTables_filter" id="sample_1_filter">
								<label>key: <input type="text" aria-controls="sample_1"
									value="${_QUERY_s_eq_groupKey}" class="span1 m-wrap medium"
									name="_QUERY_s_eq_groupKey" id="_QUERY_s_eq_groupKey"></label>
							</div>
						</div>
						<div class="span6">
							<div class="dataTables_filter" id="sample_1_filter">
								<label>是否有效: <@select paramCode=iseffCode
									value=(_QUERY_n_eq_iseff)?if_exists item='
									name="_QUERY_n_eq_iseff"'/></label>
							</div>
						</div>

					</div>
				</form>

				<div class="alert alert-error " id="errTip" style="display: none;"></div>
				<div class="alert alert-success " id="sucTip" style="display: none;"></div>
				<div class="tab-pane active" id="tab_1">
					<div class="portlet-body">
						<div class="clearfix">
							<button id="group_query_btn" class="btn blue">
								<i class="icon-search"></i>&nbsp;&nbsp;查询
							</button>
							<button id="group_add_btn" class="btn blue">
								<i class="icon-plus"></i>&nbsp;&nbsp;新增
							</button>
							<button id="group_del_btn" class="btn blue">
								<i class="icon-trash"></i>&nbsp;&nbsp;删除
							</button>
						</div>
						<br>
						<form action="${_contextPath}/Admin-Group-show.action"
							id="QueryForm">
							<table class="table table-striped table-bordered table-hover"
								id="groupTable">
								<thead>
									<tr>
										<th style="width: 8px;"><input type="checkbox"
											class="group-checkable" data-set="#groupTable .checkboxes" /></th>

										<th>类型</th>
										<th>组key</th>
										<th>组名称</th>
										<th>是否有效</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<#list pageBean.result as group >
									<tr class="odd gradeX">
										<td><input type="checkbox" class="checkboxes"
											value="${group.id}" /></td>
										<td><@translate paramCode=groupType
											value=(group.groupType)?if_exists /></td>
										<td>${group.groupKey}</td>
										<td>${group.name}</td>
										<td><@translate paramCode=iseffCode
											value=(group.iseff)?if_exists /></td>
										<td><a href='#' name="edit_action" value="${group.id}"><i
												class="icon-edit"></i></a></td>
									<tr></#list>
								</tbody>
							</table>
						</form>
						<@pagination searchFormId='groupSearchForm' pBean=pageBean />
					</div>
				</div>

			</div>
		</div>
		<!-- END EXAMPLE TABLE PORTLET-->
	</div>
</div>
</div>

<script>
	jQuery(document).ready(function() {
		tableAction.init({
			tableId : 'groupTable',
			queryUrl : '${contextPath}/Admin-Group-show.action',
			deleteUrl : '${contextPath}/Admin-Group-delete.action',
			editUrl : '${contextPath}/Admin-Group-showEditForm.action',
			queryBtnId : 'group_query_btn',
			deleteBtnId : 'group_del_btn',
			editBtnId : 'group_add_btn',
			searchFormId : 'groupSearchForm'
		});
	});
</script>
